package com.bjsxt;
//通配符  ShowMsg02
public class TestShowMsg02 {
    public static void main(String[] args) {
        //两个类都要创建对象
        //因为指定了Integer 所以其它的类型不可以
        ShowMsg02 showMsg02 = new ShowMsg02();
        Generic02<Integer> generic02 = new Generic02<>();
        generic02.setFlag(23133);
        showMsg02.showFlag02(generic02);

        //通配符 随意使用其它类型
        ShowMsg02 showMsg021 = new ShowMsg02();
        Generic02<String> generic021 = new Generic02<>();
        generic021.setFlag("ppa");
        showMsg021.showFlag03(generic021);

        Generic02<Number> generic022 = new Generic02<>();
        generic022.setFlag(22);
        showMsg021.showFlag03(generic022);

    }
}
